1. Field of the Invention
The present invention relates to network congestion control. More specifically, the present invention relates to methods and apparatus for detecting congestion and controlling congestion.
2. Description of Related Art
Many conventional network protocols use packet dropping to alleviate congestion at a shared resource such as a network node. In one example, a network node in an IP based network receives input data from multiple sources at a rate exceeding its output bandwidth. In conventional implementations, selected packets are dropped to allow transmission of remaining packets within the allocated output bandwidth. Packets can be dropped randomly or dropped using various selection criteria. The dropped packets are ultimately retransmitted under the control of a higher level protocol such as TCP.
In networks such as fibre channel networks, packet dropping is generally not allowed. Instead, networks such as fibre channel networks implement end-to-end and buffer-to-buffer flow control mechanisms. End-to-end and buffer-to-buffer flow control mechanisms do not allow a first network node to transmit to a second network node until a second network node is ready to receive a frame. The second network node typically indicates that it is ready to receive a frame by granting credits to the first network node. When frames are transmitted, credits are used. When no credits remain, the first network node can no longer transmit to the second network node. However, end-to-end and buffer-to-buffer flow control mechanisms provide only a very rough technique for controlling congestion, as the mechanism blocks all traffic along a particular link. Such blocking can quickly propagate upstream to other links in a fibre channel network topology. Some of these links might serve as corridors for paths that do not include the originally congested link. Hence, congestion at one link of one network path can sometimes cause blocking over a much wider portion of a fibre channel topology.
The end-to-end credit mechanism takes into account the availability of buffers in the receiving node. However, it does not react to changes in the network environment, so congestion and blocking on the network can still occur. Furthermore, the end-to-end credit mechanism is typically applied between end nodes exchanging Class 2 traffic. Most fibre channel devices, however, do not exchange Class 2 traffic. Consequently, both end-to-end and buffer-to-buffer credit mechanisms do not optimize or even attempt to optimize traffic flow in a network.
It is therefore desirable to provide methods and apparatus for improving congestion control at networks nodes in a network such as a fibre channel network with respect to some or all of the performance limitations noted above.